ResourceUnit()

Shift & Break System Function

Syntax samples

RESOURCEUNIT()

Description

Returns the unit number of the resource being used.

Valid In

Pre-Off Shift, Off-shift, Pre-Break, Break, Resource Clock DT, Resource Usage DT, Resource Node and Subroutine logic

Example

When a multi-unit resource goes on shift, it is sometimes helpful to know which unit of the resource is going off shift. Depending on the resource unit you may want to skip the shift or update a variable that is used elsewhere in your model.